import { reqfree, requestBanner, requestFloor } from '@/api'

const actions = {
    reqhome(context) {
        reqfree().then(function(res) {

            context.commit('REQHOME', res.data.data)
        })

    },
    bannerlist(context) {
        requestBanner().then(function(res) {

            context.commit('BANNERLIST', res.data.data)
        })
    },
    floor(context) {
        requestFloor().then(function(res) {
            context.commit('REQUESTFLOOR', res.data.data)

        })
    },

}
const mutations = {
    REQHOME(state, value) {
        state.typenave = value
    },
    BANNERLIST(state, value) {
        state.banner = value
    },
    REQUESTFLOOR(state, value) {
        state.floors = value
    }
}
const state = {
    typenave: {},
    banner: {},
    floors: {}
}
const getters = {}

export default {
    actions,
    mutations,
    state,
    getters,

}